<%@ page language="java" import="java.util.*" pageEncoding="utf-8"
         contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>徐二组体育馆管理系统后台</title>
    <link href=" ${pageContext.request.contextPath}/static/cssa/nav.css" rel="stylesheet" type="text/css"/>
    <script src="${pageContext.request.contextPath}/static/js/nav.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/static/js/focus.js" type="text/javascript"></script>
    <link href=" ${pageContext.request.contextPath}/static/cssa/common.css" rel="stylesheet" type="text/css"/>
</head>

<body>
<%@ include file="header.jsp" %>
<div id="main">
    <div id="row_1">
        <% if (null == request.getSession().getAttribute("userID")) {%>
        <div id="admin-login">
            <form action="${pageContext.request.contextPath}/user/login" method="post">
                <p> 手机号
                    <input name="userPhone" type="text" class="input_text"/>
                </p>
                <p> 密码&nbsp;&nbsp;
                    <input name="password" type="password" class="input_text"/>
                </p>
                <p>
                    <input name="action" type="hidden" value="login"/>
                    <input name="" type="submit" value="登录" class="btn_submit"/>
                    <input name="" type="reset" value="重置" class="btn_submit"/>
                </p>
            </form>
        </div>
        <% } else {%>
        <table class="admin-info" cellspacing="2px">
            <c:forEach items="${admins}" var="list">
                <tr>
                    <th scope="row">编号</th>
                    <td>${list.USERID}</td>
                </tr>
                <tr>
                    <th scope="row">姓名</th>
                    <td>${list.USERNAME}</td>
                </tr>
                <tr>
                    <th scope="row">性别</th>
                    <td>${list.USERSEX}</td>
                </tr>
                <tr>
                    <th scope="row">年龄</th>
                    <td>${list.USERAGE}</td>
                </tr>
                <tr>
                    <th scope="row">手机号码</th>
                    <td>${list.USERPHONE}</td>
                </tr>
            </c:forEach>
        </table>
        <br/>
        <br/>
        <h3 class="align-center"><a href="${pageContext.request.contextPath}/user/adminLogOut">退出登录</a></h3>
        <%}%>
    </div>
</div>
<script>
  var def = "1";
</script>
<%@ include file="footer.jsp" %>
</body>
</html>
